package sfmc.biz.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import sfmc.biz.dao.SfmcOptionDao;
import sfmc.biz.service.SfmcOptionService;
import sfmc.biz.vo.Sfmc_TB_OPTION;

@Service("SfmcOptionService")
public class SfmcOptionServiceImpl implements SfmcOptionService{
	
	protected Log log = LogFactory.getLog(this.getClass());
	
	@Resource(name="SfmcOptionDao")
	private SfmcOptionDao sfmcOptionDao;
	
	public void setSfmcOption(SfmcOptionDao sfmcOptionDao){
		this.sfmcOptionDao = sfmcOptionDao;
	}

	@Override
	public List<Sfmc_TB_OPTION> getOptionList(Sfmc_TB_OPTION sfmc_TB_OPTION) {	
		return sfmcOptionDao.getOptionList(sfmc_TB_OPTION);
	}

	@Override
	public int updateOption(Sfmc_TB_OPTION dto) {
		try{
			return sfmcOptionDao.updateOption(dto);
		}catch(Exception e){
			log.error(e);
			return -1;
		}
	}
}
